<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="../static/assets/css/layui.css">
<link rel="stylesheet" href="../static/assets/css/view.css" />
<link rel="icon" href="/favicon.ico">
<link rel="stylesheet" href="../static/assets/css/amazeui.css" />
<link rel="stylesheet"
	href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<link rel="stylesheet" href="../static/assets/css/core.css" />
<link rel="stylesheet" href="../static/assets/css/menu.css" />
<link rel="stylesheet" href="../static/assets/css/index.css" />
<link rel="stylesheet" href="../static/assets/css/admin.css" />
<link rel="stylesheet" href="../static/assets/css/page/typography.css" />
<link rel="stylesheet" href="../static/assets/css/page/form.css" />
<title>管理后台</title>
</head>
<body class="layui-view-body">
	<div class="layui-content">
		<div class="layui-page-header">
			<div class="pagewrap">
			
				<h2 class="title">用户组</h2>
			</div>
		</div>
		<div class="layui-row">
			<div class="layui-card">
				<div class="layui-card-body">
					<div class="form-box">
						<div class="layui-form layui-form-item">
							<div class="layui-inline">
								<div class="layui-form-mid" >用户名称:</div>
								<form action="<%=request.getContextPath() %>/selectUserByUserName">
									<div class="layui-input-inline" style="width: 100px;">
										<input type="text"  class="layui-input" name="username">
									</div>
									<button type="submit" class="layui-btn layui-btn-blue" >查询</button>
									<button class="layui-btn layui-btn-primary" type="reset">重置</button>
								</form>
							</div>
						</div>
						<a href="<%=request.getContextPath() %>/toregist">新增</a>
<!-- 							<button class="layui-btn layui-btn-blue" > -->
<!-- 								<i class="layui-icon">&#xe654;</i>新增 -->
<!-- 							</button> -->
						
						<table id="demo"></table>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div class="am-g">
		<div class="am-u-sm-12">
			<form class="am-form">
				<table class="am-table am-table-striped am-table-hover table-main">
					<thead>
						<tr>
							<th class="table-check"><input type="checkbox" /></th>
							<th class="table-id">ID</th>
							<th class="table-title">用户名称：</th>
							<th class="table-author am-hide-sm-only">昵称：</th>
							<th class="table-author am-hide-sm-only"></th>
						</tr>
					</thead>
					<tbody>
						<c:forEach items="${userList}" var="u" varStatus="status">
							<tr>
								<th class="table-check"><input type="checkbox" /></th>
								<th class="table-id">${u.id }</th>
								<th class="table-title">${u.username }</th>
								<th class="table-author am-hide-sm-only">${u.nickname }</th>
								<th class="table-author am-hide-sm-only">
									<a href="<%=request.getContextPath() %>/deleteUserById?userId=${u.id }">
										<button type="button" class="layui-btn layui-btn-blue">删除</button>
									</a>
								</th>
							</tr>

						</c:forEach>

					</tbody>
				</table>
			</form>
		</div>
	</div>
</body>
</html>